package com.xunyun.kotlinwc.main.datasource

import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.MutableLiveData
import androidx.paging.DataSource
import com.xunyun.kotlinwc.main.model.Article

/**
 * @author gl
 * @date 2021/9/13
 * @desc
 */
class ArticleDataSourceFactory constructor(var lifecycleOwner: LifecycleOwner,
                                           var infoMsg : MutableLiveData<String>): DataSource.Factory<Int, Article>() {
    override fun create(): DataSource<Int, Article> {
      return ArticleDataSource(lifecycleOwner,infoMsg)
    }
}